//
//  AnnouncementVC.m
//  DirectMember
//
//  Created by jzd on 2018/6/20.
//  Copyright © 2018年 宋佳. All rights reserved.
//

#import "AnnouncementVC.h"
#import "AnnouncementCell.h"
#import "AnnountDetailController.h"

@interface AnnouncementVC ()<UITableViewDelegate,UITableViewDataSource>
@property (weak, nonatomic) IBOutlet UITableView *tableV;

@end

@implementation AnnouncementVC

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.navigationItem.title = @"公告";
    [self.tableV registerNib:[UINib nibWithNibName:NSStringFromClass([AnnouncementCell class]) bundle:nil] forCellReuseIdentifier:AnnouncementCellIdentifier];
}
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 1;
}
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    return 3;
}
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
    AnnouncementCell *cell = [tableView dequeueReusableCellWithIdentifier:AnnouncementCellIdentifier];
    return cell;
}
-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 80;
}
-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
    [tableView deselectRowAtIndexPath:indexPath animated:YES];
    AnnountDetailController *vc = [[AnnountDetailController alloc]init];
    [self.navigationController pushViewController:vc animated:YES];
}
@end
